
use crate::metadata::ir::*;
pub(crate) static REGISTERS: IR = IR {
    blocks: &[
        Block {
            name: "Lcd",
            extends: None,
            description: Some("Liquid crystal display controller"),
            items: &[
                BlockItem {
                    name: "cr",
                    description: Some("control register"),
                    array: None,
                    byte_offset: 0x0,
                    inner: BlockItemInner::Register(Register {
                        access: Access::ReadWrite,
                        bit_size: 32,
                        fieldset: Some("Cr"),
                    }),
                },
                BlockItem {
                    name: "fcr",
                    description: Some("frame control register"),
                    array: None,
                    byte_offset: 0x4,
                    inner: BlockItemInner::Register(Register {
                        access: Access::ReadWrite,
                        bit_size: 32,
                        fieldset: Some("Fcr"),
                    }),
                },
                BlockItem {
                    name: "sr",
                    description: Some("status register"),
                    array: None,
                    byte_offset: 0x8,
                    inner: BlockItemInner::Register(Register {
                        access: Access::ReadWrite,
                        bit_size: 32,
                        fieldset: Some("Sr"),
                    }),
                },
                BlockItem {
                    name: "clr",
                    description: Some("clear register"),
                    array: None,
                    byte_offset: 0xc,
                    inner: BlockItemInner::Register(Register {
                        access: Access::Write,
                        bit_size: 32,
                        fieldset: Some("Clr"),
                    }),
                },
                BlockItem {
                    name: "ram_com",
                    description: Some("display memory"),
                    array: Some(Array::Regular(RegularArray { len: 8, stride: 8 })),
                    byte_offset: 0x14,
                    inner: BlockItemInner::Block(BlockItemBlock { block: "RamCom" }),
                },
            ],
        },
        Block {
            name: "RamCom",
            extends: None,
            description: Some("display memory"),
            items: &[
                BlockItem {
                    name: "low",
                    description: Some("display memory low word"),
                    array: None,
                    byte_offset: 0x0,
                    inner: BlockItemInner::Register(Register {
                        access: Access::ReadWrite,
                        bit_size: 32,
                        fieldset: None,
                    }),
                },
                BlockItem {
                    name: "high",
                    description: Some("display memory high word"),
                    array: None,
                    byte_offset: 0x4,
                    inner: BlockItemInner::Register(Register {
                        access: Access::ReadWrite,
                        bit_size: 32,
                        fieldset: None,
                    }),
                },
            ],
        },
    ],
    fieldsets: &[
        FieldSet {
            name: "Clr",
            extends: None,
            description: Some("clear register"),
            bit_size: 32,
            fields: &[
                Field {
                    name: "sofc",
                    description: Some("Start of frame flag clear"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 1 }),
                    bit_size: 1,
                    array: None,
                    enumm: None,
                },
                Field {
                    name: "uddc",
                    description: Some("Update display done clear"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 3 }),
                    bit_size: 1,
                    array: None,
                    enumm: None,
                },
            ],
        },
        FieldSet {
            name: "Cr",
            extends: None,
            description: Some("control register"),
            bit_size: 32,
            fields: &[
                Field {
                    name: "lcden",
                    description: Some("LCD controller enable"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 0 }),
                    bit_size: 1,
                    array: None,
                    enumm: None,
                },
                Field {
                    name: "vsel",
                    description: Some("Voltage source selection"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 1 }),
                    bit_size: 1,
                    array: None,
                    enumm: None,
                },
                Field {
                    name: "duty",
                    description: Some("Duty selection"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 2 }),
                    bit_size: 3,
                    array: None,
                    enumm: None,
                },
                Field {
                    name: "bias",
                    description: Some("Bias selector"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 5 }),
                    bit_size: 2,
                    array: None,
                    enumm: None,
                },
                Field {
                    name: "mux_seg",
                    description: Some("Mux segment enable"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 7 }),
                    bit_size: 1,
                    array: None,
                    enumm: None,
                },
            ],
        },
        FieldSet {
            name: "Fcr",
            extends: None,
            description: Some("frame control register"),
            bit_size: 32,
            fields: &[
                Field {
                    name: "hd",
                    description: Some("High drive enable"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 0 }),
                    bit_size: 1,
                    array: None,
                    enumm: None,
                },
                Field {
                    name: "sofie",
                    description: Some("Start of frame interrupt enable"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 1 }),
                    bit_size: 1,
                    array: None,
                    enumm: None,
                },
                Field {
                    name: "uddie",
                    description: Some("Update display done interrupt enable"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 3 }),
                    bit_size: 1,
                    array: None,
                    enumm: None,
                },
                Field {
                    name: "pon",
                    description: Some("Pulse ON duration"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 4 }),
                    bit_size: 3,
                    array: None,
                    enumm: None,
                },
                Field {
                    name: "dead",
                    description: Some("Dead time duration"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 7 }),
                    bit_size: 3,
                    array: None,
                    enumm: None,
                },
                Field {
                    name: "cc",
                    description: Some("Contrast control"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 10 }),
                    bit_size: 3,
                    array: None,
                    enumm: None,
                },
                Field {
                    name: "blinkf",
                    description: Some("Blink frequency selection"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 13 }),
                    bit_size: 3,
                    array: None,
                    enumm: None,
                },
                Field {
                    name: "blink",
                    description: Some("Blink mode selection"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 16 }),
                    bit_size: 2,
                    array: None,
                    enumm: None,
                },
                Field {
                    name: "div",
                    description: Some("DIV clock divider"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 18 }),
                    bit_size: 4,
                    array: None,
                    enumm: None,
                },
                Field {
                    name: "ps",
                    description: Some("PS 16-bit prescaler"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 22 }),
                    bit_size: 4,
                    array: None,
                    enumm: None,
                },
            ],
        },
        FieldSet {
            name: "Sr",
            extends: None,
            description: Some("status register"),
            bit_size: 32,
            fields: &[
                Field {
                    name: "ens",
                    description: Some("LCD enabled status"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 0 }),
                    bit_size: 1,
                    array: None,
                    enumm: None,
                },
                Field {
                    name: "sof",
                    description: Some("Start of frame flag"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 1 }),
                    bit_size: 1,
                    array: None,
                    enumm: None,
                },
                Field {
                    name: "udr",
                    description: Some("Update display request"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 2 }),
                    bit_size: 1,
                    array: None,
                    enumm: None,
                },
                Field {
                    name: "udd",
                    description: Some("Update Display Done"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 3 }),
                    bit_size: 1,
                    array: None,
                    enumm: None,
                },
                Field {
                    name: "rdy",
                    description: Some("Ready flag"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 4 }),
                    bit_size: 1,
                    array: None,
                    enumm: None,
                },
                Field {
                    name: "fcrsf",
                    description: Some("LCD Frame Control Register Synchronization flag"),
                    bit_offset: BitOffset::Regular(RegularBitOffset { offset: 5 }),
                    bit_size: 1,
                    array: None,
                    enumm: None,
                },
            ],
        },
    ],
    enums: &[],
};
